<?php

namespace App\Http\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Zizaco\Entrust\Traits\EntrustUserTrait;

class AdminUser extends Authenticatable
{
    use EntrustUserTrait;
    protected $table="admins";

    protected $fillable = [
        'name',
        'email',
        'password',
        'is_super',
        'status',
    ];
    protected $hidden = [
        'password',
        'remember_token',
    ];

    /**
     * 获取权限外键
     */
    public function RoleUser()
    {
        return $this->hasMany(RoleUser::class, 'user_id','id');
    }
}
